<?php

use Phinx\Migration\AbstractMigration;

class AddColumnIsSystemInUserTable extends AbstractMigration
{
    public function up()
    {
        $this->table("user")
            ->addColumn("is_system", 'enum', [
                'values' => "yes,no",
                'default' => "no",
                'comment' => "是否系统用户",
                'null' => false,
            ])->save();
    }

    public function down()
    {
        $this->table("user")->removeColumn("is_system")->save();
    }
}
